package com.brogent.webview;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;

public class WebViewActivity extends Activity {
    private WebView mWebView1; 
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        
//        String strIFrame = 
//          "<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/igjSxrCXsMo&hl=zh_TW&fs=1&\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/igjSxrCXsMo&hl=zh_TW&fs=1&\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>";

//        String strIFrame =       "<iframe name=\"Hippo_ImageNote_frame\"" +
//        "width=\"320\" height=\"480\"" +
//        "frameborder=\"0\" src=" +
//        "\"http://badge.facebook.com/badge/801014014.1715.274260441.png\""+
//        "marginwidth=\"0\" marginheight=\"0\" vspace=\"0\" " +
//        "hspace=\"0\" allowtransparency=\"true\"" +
//        "scrolling=\"no\"></iframe>";

        String strIFrame = "<a href=\"http://www.facebook.com/profile.php?id=100000552561450\" onclick=\"(new Image()).src = '/ajax/ct.php?app_id=60923938809&amp;action_type=3&amp;post_form_id=ffb77fa8e38f57d2f66dfad53f8ef08a&amp;position=14&amp;' + Math.random();return true;\">Lin</a>anwsers<a href=\"http://www.facebook.com/profile.php?id=714109951\" onclick=\"(new Image()).src = '/ajax/ct.php?app_id=60923938809&amp;action_type=3&amp;post_form_id=ffb77fa8e38f57d2f66dfad53f8ef08a&amp;position=14&amp;' + Math.random();return true;\">Ivy Chen</a>secret</div><div class=\"UIStoryAttachment_Copy\">do you think Ivy Chen trust worthy？<br>[<a href=\"http://apps.facebook.com/friend-secrets/?id=714109951&amp;qid=50&amp;sig=c53e03415d20fb68cb448daef2c4a1c6&amp;_fb_fromhash=209c5c3b9734b35ee1e1bb9f130ff68e\" onclick=\"(new Image()).src = '/ajax/ct.php?app_id=60923938809&amp;action_type=3&amp;post_form_id=ffb77fa8e38f57d2f66dfad53f8ef08a&amp;position=14&amp;' + Math.random();return true;\">yes</a>] [<a href=\"http://apps.facebook.com/friend-secrets/?id=714109951&amp;qid=50&amp;sig=c53e03415d20fb68cb448daef2c4a1c6&amp;_fb_fromhash=209c5c3b9734b35ee1e1bb9f130ff68e\" onclick=\"(new Image()).src = '/ajax/ct.php?app_id=60923938809&amp;action_type=3&amp;post_form_id=ffb77fa8e38f57d2f66dfad53f8ef08a&amp;position=14&amp;' + Math.random();return true;\">no</a>] [<a href=\"http://apps.facebook.com/friend-secrets/?id=714109951&amp;qid=50&amp;sig=c53e03415d20fb68cb448daef2c4a1c6&amp;_fb_fromhash=209c5c3b9734b35ee1e1bb9f130ff68e\" onclick=\"(new Image()).src = '/ajax/ct.php?app_id=60923938809&amp;action_type=3&amp;post_form_id=ffb77fa8e38f57d2f66dfad53f8ef08a&amp;position=14&amp;' + Math.random();return true;\">maybe</a>]</div>";
        
        //"<iframe id=test name=test src=http://badge.facebook.com/badge/801014014.1715.274260441.png";
        /*�]�wWebView������*/
        mWebView1 = (WebView) findViewById(R.id.myWebView1);
        WebSettings webSettings = mWebView1.getSettings(); 
        webSettings.setJavaScriptEnabled(true); 

//        mWebView1.
//        loadData(
//        "<html><body>"+strIFrame+"</body></html>", "text/html", "utf-8");

        mWebView1.
        loadData( strIFrame, "text/html", "utf-8");
    }
}